import { IPage } from "../../IPage";

class CircleModel {
  r:number = 1;
  set name(name:string) {

  }

  /**
   * 获取面积,是一个计算属性.
   */
  get area():number {
    return Math.PI * this.r * this.r;
  }
}

let c = new CircleModel();
console.log(`the area of c is: ${c.area}`);


module.exports = <IPage>{
    showPage: () => {
        console.log("this is page");
    }
}

/**
 * 1,函数前面加上get,表明是一个get方法,可以用 xx.name 进行调用.
 */